package cn.net.yugu.doraemon.common.util.function;

import java.time.Instant;

public interface ToStringFunction<T> {

    /**
     * Applies this function to the given argument.
     *
     * @param value the function argument
     * @return the function result
     */
    String applyAsString(T value);

   ToStringFunction<Instant> InstantToStringFunction = value -> {
        if (value == null) {
            return null;
        }
        return String.valueOf(value.toEpochMilli());
    };
}
